import factory.AbsFactory;
import factory.ColorFactory;
import factory.ShapeFactory;

/**
 * 这个就是简单工厂模式了，生产类型的工厂类
 */
public class FactoryProducer {
    public static AbsFactory getSimpleFactory(String type){
        if ("color".equalsIgnoreCase(type)) {
            return new ColorFactory();
        }else{
            return new ShapeFactory();
        }
    }
}
